// 全局JS入口文件,全局相关的操作放到这里
layui.use(['layer', 'form', 'element','jquery'], function() {
	var $ = layui.$,	//加载jquery模块
	layer = layui.layer,
	form = layui.form,
	element = layui.element;

});

function logout() {
	layer.confirm('你确定要退出当前系统？', {
		btn: ['确定', '取消']
	}, function () {
		layui.$.ajax({
			url: "/api/user/logout",
			type: "POST",
			success: function (result) {
				if (result.code == 302) {
					location.href = "/login";
				}
			},
		});
	}, function () {
		layer.msg('已取消操作', { icon: 1 });
	});
}